package com.joven.shelltest.service.impl;

import com.joven.shelltest.dto.NettyReq;
import com.joven.shelltest.dto.NettyRsp;
import com.joven.shelltest.service.MessageHandler;
import org.springframework.stereotype.Service;

/**
 * @Author wzj
 * @Date 2023-09-14 17:32
 **/
@Service("nettyDealMessage")
public class NettyDealMessage implements MessageHandler<NettyRsp, NettyReq> {

    @Override
    public NettyRsp process(NettyReq requestObj) {
        NettyRsp rsp = new NettyRsp();
        rsp.setCode(requestObj.getId());
        rsp.setResult(requestObj.getName());
        return rsp;
    }
}
